package tds.model15.version3;
/**
 * @Company 杭州先锋电子技术股份有限公司
 * @ClassName GoodNotifier
 * @Description 通知者
 * @author tds
 * @Date 2020/1/31 20:57
 * @version 1.0.0
 */
public class GoodNotifier extends Notifier {

    @Override
    public void addListener(Object object, String methodName, Object... args) {
        System.out.println("有新的同学委托尽职的放哨人！");
        this.getEventHandler().addEvent(object, methodName, args);
    }

    @Override
    public void notifyX() {
        System.out.println("尽职尽责的放哨人告诉同学们：老师来了！");
        try {
            this.getEventHandler().notifyX();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
